﻿//===================================================================
// 西交通开发框架-XCI.Parent 2019 版权所有     
//===================================================================
using System;
using System.ComponentModel.DataAnnotations;
using XCI.Data.Entity;

namespace XCI.Sys.Model
{
    /// <summary>
    /// 系统序列
    /// </summary>
    [Table("系统序列")]
    public class SysSeq
    {
        /// <summary>
        /// 序列主键
        /// </summary>
        [Primary]
        [Column("序列主键", false)]
        public string Id { get; set; }

        /// <summary>
        /// 序列名称
        /// </summary>
        [Column("序列名称")]
        [Required(ErrorMessage = "请输入序列名称")]
        [StringLength(100, ErrorMessage = "序列名称不能超过100个字符")]
        public string Name { get; set; }

        /// <summary>
        /// 序列编码
        /// </summary>
        [Column("序列编码")]
        [Required(ErrorMessage = "请输入序列编码")]
        [StringLength(100, ErrorMessage = "序列编码不能超过100个字符")]
        public string Code { get; set; }

        /// <summary>
        /// 开始值
        /// </summary>
        [Column("开始值")]
        public int? StartWith { get; set; }

        /// <summary>
        /// 当前值
        /// </summary>
        [Column("当前值")]
        public int? CurrentValue { get; set; }

        /// <summary>
        /// 步长
        /// </summary>
        [Column("步长")]
        public int? IncrementBy { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [Column("备注")]
        [StringLength(500, ErrorMessage = "备注不能超过500个字符")]
        public string Remark { get; set; }

        /// <summary>
        /// 复制对象
        /// </summary>
        public SysSeq Clone()
        {
            return (SysSeq)MemberwiseClone();
        }
    }
}
